<%--
  Created by IntelliJ IDEA.
  User: user
  Date: 2015/12/11
  Time: 11:22
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<jsp:include page="../common.jsp"/>
<body>
<div id="wrap">
  <div id="top_content">
    <jsp:include page="../head.jsp"/>
    <div id="content">
      <p id="whereami">
      </p>

      <h1>
        Welcome! 
      </h1>
      <table class="table">
        <tr class="table_header">
          <td>
            ID
          </td>
          <td>
            Name
          </td>
          <td>
            Salary
          </td>
          <td>
            Age
          </td>
          <td>
            marry
          </td>
          <td>
            Operation
          </td>
        </tr>
        <c:forEach items="${empList}" var="emp" varStatus="i">
        <tr class="row${i.index % 2 + 1}">
          <td>
            ${emp.empId}
          </td>
          <td>
            ${emp.name}
          </td>
          <td>
            ${emp.sal}
          </td>
          <td>
            ${emp.age}
          </td>
          <td>
            <c:choose>
              <c:when test="${emp.marry == true}">Yes</c:when>
              <c:when test="${emp.marry == false}">No</c:when>
            </c:choose>
          </td>
          <td>
            <a href="${base}/emp/deleteEmp?empId=${emp.empId}">删除</a>&nbsp;<a href="${base}/emp/updateEmpView?empId=${emp.empId}">修改</a>
          </td>
        </tr>
        </c:forEach>
      </table>
      <p>
        <input type="button" class="button" value="新增" onclick="javascript:window.location.href='${base}/emp/addEmpView'"/>
      </p>
    </div>
  </div>
<jsp:include page="../foot.jsp"/>
</div>
</body>
</html>
